import { mapMutations, mapState } from 'vuex'

// 系统信息混入逻辑
export const systemMixin = {
  computed: {
    ...mapState('system', ['safeTop']),
  },
}
// 用户信息混入逻辑
export const userMixin = {
  computed: {
    ...mapState('user', ['profile']),
  },
  methods: {
    ...mapMutations('user', ['setProfile', 'clearProfile']),
  },
}

export const addressMixin = {
  computed: {
    ...mapState('address', ['selectedAddress']),
  },
  methods: {
    ...mapMutations('address', ['setSelectedAddress']),
  },
}
